<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" >

<title>Java指令集 | 跬步</title>
<meta name="description" content="不积跬步，无以至千里">

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="shortcut icon" href="https://skylaugh.gitee.io/blog/favicon.ico?v=1698591240151">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css">
<link rel="stylesheet" href="https://skylaugh.gitee.io/blog/styles/main.css">



<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>

<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />



  </head>
  <body>
    <div id="app" class="main">

      <div class="sidebar" :class="{ 'full-height': menuVisible }">
  <div class="top-container" data-aos="fade-right">
    <div class="top-header-container">
      <a class="site-title-container" href="https://skylaugh.gitee.io/blog">
        <img src="https://skylaugh.gitee.io/blog/images/avatar.png?v=1698591240151" class="site-logo">
        <h1 class="site-title">跬步</h1>
      </a>
      <div class="menu-btn" @click="menuVisible = !menuVisible">
        <div class="line"></div>
      </div>
    </div>
    <div>
      
        
          <a href="/blog/archives" class="site-nav">
            归档
          </a>
        
      
        
          <a href="/blog/tags" class="site-nav">
            标签
          </a>
        
      
        
          <a href="/blog/post/about" class="site-nav">
            关于
          </a>
        
      
    </div>
  </div>
  <div class="bottom-container" data-aos="flip-up" data-aos-offset="0">
    <div class="social-container">
      
        
      
        
      
        
      
        
      
        
      
    </div>
    <div class="site-description">
      不积跬步，无以至千里
    </div>
    <div class="site-footer">
      <a href="mailto:skylaugh@foxmail.com">Email</a> | <a class="rss" href="https://skylaugh.gitee.io/blog/atom.xml" target="_blank">RSS</a>
    </div>
  </div>
</div>


      <div class="main-container">
        <div class="content-container" data-aos="fade-up">
          <div class="post-detail">
            <h2 class="post-title">Java指令集</h2>
            <div class="post-date">2019-12-17</div>
            
              <div class="feature-container" style="background-image: url('https://skylaugh.gitee.io/blog/post-images/java-zhi-ling-ji.jpg')">
              </div>
            
            <div class="post-content">
              <p>举个例子:</p>
<pre><code>public class HelloWorld {
    public static void main(String[] args){
        String a = &quot;Hello&quot;;
        String b = &quot;World&quot;;
        System.out.println(a+b);
    }
}
</code></pre>
<p>编译、查看指令集：</p>
<pre><code>javac HelloWorld.java
javap -c HelloWorld.class
</code></pre>
<p>结果：</p>
<pre><code>Compiled from &quot;HelloWorld.java&quot;
public class Study20191104.HelloWorld {
  public Study20191104.HelloWorld();
    Code:
       0: aload_0
       1: invokespecial #1                  // Method java/lang/Object.&quot;&lt;init&gt;&quot;:()V
       4: return

  public static void main(java.lang.String[]);
    Code:
       0: ldc           #2                  // String Hello
       2: astore_1
       3: ldc           #3                  // String World
       5: astore_2
       6: getstatic     #4                  // Field java/lang/System.out:Ljava/io/PrintStream;
       9: new           #5                  // class java/lang/StringBuilder
      12: dup
      13: invokespecial #6                  // Method java/lang/StringBuilder.&quot;&lt;init&gt;&quot;:()V
      16: aload_1
      17: invokevirtual #7                  // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      20: aload_2
      21: invokevirtual #7                  // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: invokevirtual #8                  // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      27: invokevirtual #9                  // Method java/io/PrintStream.println:(Ljava/lang/String;)V
      30: return
}
</code></pre>
<p>可以对照下边的指令集表看看每一步都做了什么。以上其实还可以看出一个有意思的地方，String的拼接实现其实是调用了StringBuilder的append方法。</p>
<hr>
<table>
<thead>
<tr>
<th>指令码</th>
<th>助记符</th>
<th>操作数</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>0x00</td>
<td>nop</td>
<td>无</td>
<td>什么都不做</td>
</tr>
<tr>
<td>0x01</td>
<td>aconst_null</td>
<td>无</td>
<td>将null推送至栈顶</td>
</tr>
<tr>
<td>0x02</td>
<td>iconst_m1</td>
<td>无</td>
<td>将int型-1推送至栈顶</td>
</tr>
<tr>
<td>0x03</td>
<td>iconst_0</td>
<td>无</td>
<td>将int常量0推送至栈顶</td>
</tr>
<tr>
<td>0x04</td>
<td>iconst_1</td>
<td>无</td>
<td>将int常量1推送至栈顶</td>
</tr>
<tr>
<td>0x05</td>
<td>iconst_2</td>
<td>无</td>
<td>将int常量2推送至栈顶</td>
</tr>
<tr>
<td>0x06</td>
<td>iconst_3</td>
<td>无</td>
<td>将int常量3推送至栈顶</td>
</tr>
<tr>
<td>0x07</td>
<td>iconst_4</td>
<td>无</td>
<td>将int常量4推送至栈顶</td>
</tr>
<tr>
<td>0x08</td>
<td>iconst_5</td>
<td>无</td>
<td>将int常量5推送至栈顶</td>
</tr>
<tr>
<td>0x09</td>
<td>lconst_0</td>
<td>无</td>
<td>将long常量0推送至栈顶</td>
</tr>
<tr>
<td>0x0a</td>
<td>lconst_1</td>
<td>无</td>
<td>将long常量1推送至栈顶</td>
</tr>
<tr>
<td>0x0b</td>
<td>fconst_0</td>
<td>无</td>
<td>将float常量0推送至栈顶</td>
</tr>
<tr>
<td>0x0c</td>
<td>fconst_1</td>
<td>无</td>
<td>将float常量1推送至栈顶</td>
</tr>
<tr>
<td>0x0d</td>
<td>fconst_2</td>
<td>无</td>
<td>将float常量2推送至栈顶</td>
</tr>
<tr>
<td>0x0e</td>
<td>dconst_0</td>
<td>无</td>
<td>将double常量0推送至栈顶</td>
</tr>
<tr>
<td>0x0f</td>
<td>dconst_1</td>
<td>无</td>
<td>将double常量1推送至栈顶</td>
</tr>
<tr>
<td>0x10</td>
<td>bipush</td>
<td>byte类型操作数</td>
<td>将单字节的常量值(-128~127)推送至栈顶</td>
</tr>
<tr>
<td>0x11</td>
<td>sipush</td>
<td>int类型操作数</td>
<td>将一个短整型常量值(-32768~32767)推送至栈顶</td>
</tr>
<tr>
<td>0x12</td>
<td>ldc</td>
<td>常量编号</td>
<td>将int, float或String型常量值从常量池中推送至栈顶</td>
</tr>
<tr>
<td>0x13</td>
<td>ldc_w</td>
<td>常量编号</td>
<td>将int, float或String型常量值从常量池中推送至栈顶（宽索引）</td>
</tr>
<tr>
<td>0x14</td>
<td>ldc2_w</td>
<td>常量编号</td>
<td>将long或double型常量值从常量池中推送至栈顶（宽索引）</td>
</tr>
<tr>
<td>0x15</td>
<td>iload</td>
<td>vindex</td>
<td>将位置为vindex的int类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x16</td>
<td>lload</td>
<td>vindex</td>
<td>将位置为vindex和(vindex+1)的long类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x17</td>
<td>fload</td>
<td>vindex</td>
<td>将位置为vindex的float类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x18</td>
<td>dload</td>
<td>vindex</td>
<td>将位置为vindex和(vindex+1)的double类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x19</td>
<td>aload</td>
<td>vindex</td>
<td>将位置为vindex的对象引用局部变量压入栈</td>
</tr>
<tr>
<td>0x1a</td>
<td>iload_0</td>
<td>无</td>
<td>将位置为0的int类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x1b</td>
<td>iload_1</td>
<td>无</td>
<td>将位置为1的int类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x1c</td>
<td>iload_2</td>
<td>无</td>
<td>将位置为2的int类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x1d</td>
<td>iload_3</td>
<td>无</td>
<td>将位置为3的int类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x1e</td>
<td>lload_0</td>
<td>无</td>
<td>将位置为0和1的long类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x1f</td>
<td>lload_1</td>
<td>无</td>
<td>将位置为1和2的long类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x20</td>
<td>lload_2</td>
<td>无</td>
<td>将位置为2和3的long类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x21</td>
<td>lload_3</td>
<td>无</td>
<td>将位置为3和4的long类型的局部变量压入栈</td>
</tr>
<tr>
<td>0x22</td>
<td>fload_0</td>
<td>无</td>
<td>将本地变量表的第一个float型本地变量推送至栈顶</td>
</tr>
<tr>
<td>0x23</td>
<td>fload_1</td>
<td>无</td>
<td>将本地变量表的第二个float型本地变量推送至栈顶</td>
</tr>
<tr>
<td>0x24</td>
<td>fload_2</td>
<td>无</td>
<td>将本地变量表的第三个float型本地变量推送至栈顶</td>
</tr>
<tr>
<td>0x25</td>
<td>fload_3</td>
<td>无</td>
<td>将本地变量表的第四个float型本地变量推送至栈顶</td>
</tr>
<tr>
<td>0x26</td>
<td>dload_0</td>
<td>无</td>
<td>将本地变量表的第一个double型本地变量推送至栈顶</td>
</tr>
<tr>
<td>0x27</td>
<td>dload_1</td>
<td>无</td>
<td>将本地变量表的第二个double型本地变量推送至栈顶</td>
</tr>
<tr>
<td>0x28</td>
<td>dload_2</td>
<td>无</td>
<td>将本地变量表的第三个double型本地变量推送至栈顶</td>
</tr>
<tr>
<td>0x29</td>
<td>dload_3</td>
<td>无</td>
<td>将本地变量表的第四个double型本地变量推送至栈顶</td>
</tr>
<tr>
<td>0x2a</td>
<td>aload_0</td>
<td>无</td>
<td>将引用类型变量推送至栈顶,非静态方法中 表示对this的操作，静态方法中表示对方法的第一参数的操作</td>
</tr>
<tr>
<td>0x2b</td>
<td>aload_1</td>
<td>无</td>
<td>将本地变量表的第二个引用类型本地变量推送至栈顶</td>
</tr>
<tr>
<td>0x2c</td>
<td>aload_2</td>
<td>无</td>
<td>将本地变量表的第三个引用类型本地变量推送至栈顶</td>
</tr>
<tr>
<td>0x2d</td>
<td>aload_3</td>
<td>无</td>
<td>将本地变量表的第四个引用类型本地变量推送至栈顶</td>
</tr>
<tr>
<td>0x2e</td>
<td>iaload</td>
<td>无</td>
<td>将int型数组指定索引的值推送至栈顶</td>
</tr>
<tr>
<td>0x2f</td>
<td>laload</td>
<td>无</td>
<td>将long型数组指定索引的值推送至栈顶</td>
</tr>
<tr>
<td>0x30</td>
<td>faload</td>
<td>无</td>
<td>将float型数组指定索引的值推送至栈顶</td>
</tr>
<tr>
<td>0x31</td>
<td>daload</td>
<td>无</td>
<td>将double型数组指定索引的值推送至栈顶</td>
</tr>
<tr>
<td>0x32</td>
<td>aaload</td>
<td>无</td>
<td>将引用型数组指定索引的值推送至栈顶</td>
</tr>
<tr>
<td>0x33</td>
<td>baload</td>
<td>无</td>
<td>将boolean或byte型数组指定索引的值推送至栈顶</td>
</tr>
<tr>
<td>0x34</td>
<td>caload</td>
<td>无</td>
<td>将char型数组指定索引的值推送至栈顶</td>
</tr>
<tr>
<td>0x35</td>
<td>saload</td>
<td>无</td>
<td>将short型数组指定索引的值推送至栈顶</td>
</tr>
<tr>
<td>0x36</td>
<td>istore</td>
<td>无</td>
<td>将栈顶int型数值存入指定本地变量</td>
</tr>
<tr>
<td>0x37</td>
<td>lstore</td>
<td>无</td>
<td>将栈顶long型数值存入指定本地变量</td>
</tr>
<tr>
<td>0x38</td>
<td>fstore</td>
<td>无</td>
<td>将栈顶float型数值存入指定本地变量</td>
</tr>
<tr>
<td>0x39</td>
<td>dstore</td>
<td>无</td>
<td>将栈顶double型数值存入指定本地变量</td>
</tr>
<tr>
<td>0x3a</td>
<td>astore</td>
<td>无</td>
<td>将栈顶引用型数值存入指定本地变量</td>
</tr>
<tr>
<td>0x3b</td>
<td>istore_0</td>
<td>无</td>
<td>将栈顶int型数值存入第一个本地变量</td>
</tr>
<tr>
<td>0x3c</td>
<td>istore_1</td>
<td>无</td>
<td>将栈顶int型数值存入第二个本地变量</td>
</tr>
<tr>
<td>0x3d</td>
<td>istore_2</td>
<td>无</td>
<td>将栈顶int型数值存入第三个本地变量</td>
</tr>
<tr>
<td>0x3e</td>
<td>istore_3</td>
<td>无</td>
<td>将栈顶int型数值存入第四个本地变量</td>
</tr>
<tr>
<td>0x3f</td>
<td>lstore_0</td>
<td>无</td>
<td>将栈顶long型数值存入第一个本地变量</td>
</tr>
<tr>
<td>0x40</td>
<td>lstore_1</td>
<td>无</td>
<td>将栈顶long型数值存入第二个本地变量</td>
</tr>
<tr>
<td>0x41</td>
<td>lstore_2</td>
<td>无</td>
<td>将栈顶long型数值存入第三个本地变量</td>
</tr>
<tr>
<td>0x42</td>
<td>lstore_3</td>
<td>无</td>
<td>将栈顶long型数值存入第四个本地变量</td>
</tr>
<tr>
<td>0x43</td>
<td>fstore_0</td>
<td>无</td>
<td>将栈顶float型数值存入第一个本地变量</td>
</tr>
<tr>
<td>0x44</td>
<td>fstore_1</td>
<td>无</td>
<td>将栈顶float型数值存入第二个本地变量</td>
</tr>
<tr>
<td>0x45</td>
<td>fstore_2</td>
<td>无</td>
<td>将栈顶float型数值存入第三个本地变量</td>
</tr>
<tr>
<td>0x46</td>
<td>fstore_3</td>
<td>无</td>
<td>将栈顶float型数值存入第四个本地变量</td>
</tr>
<tr>
<td>0x47</td>
<td>dstore_0</td>
<td>无</td>
<td>将栈顶double型数值存入第一个本地变量</td>
</tr>
<tr>
<td>0x48</td>
<td>dstore_1</td>
<td>无</td>
<td>将栈顶double型数值存入第二个本地变量</td>
</tr>
<tr>
<td>0x49</td>
<td>dstore_2</td>
<td>无</td>
<td>将栈顶double型数值存入第三个本地变量</td>
</tr>
<tr>
<td>0x4a</td>
<td>dstore_3</td>
<td>无</td>
<td>将栈顶double型数值存入第四个本地变量</td>
</tr>
<tr>
<td>0x4b</td>
<td>astore_0</td>
<td>无</td>
<td>将栈顶引用型数值存入第一个本地变量</td>
</tr>
<tr>
<td>0x4c</td>
<td>astore_1</td>
<td>无</td>
<td>将栈顶引用型数值存入第二个本地变量</td>
</tr>
<tr>
<td>0x4d</td>
<td>astore_2</td>
<td>无</td>
<td>将栈顶引用型数值存入第三个本地变量</td>
</tr>
<tr>
<td>0x4e</td>
<td>astore_3</td>
<td>无</td>
<td>将栈顶引用型数值存入第四个本地变量</td>
</tr>
<tr>
<td>0x4f</td>
<td>iastore</td>
<td>无</td>
<td>将栈顶int型数值存入指定数组的指定索引位置</td>
</tr>
<tr>
<td>0x50</td>
<td>lastore</td>
<td>无</td>
<td>将栈顶long型数值存入指定数组的指定索引位置</td>
</tr>
<tr>
<td>0x51</td>
<td>fastore</td>
<td>无</td>
<td>将栈顶float型数值存入指定数组的指定索引位置</td>
</tr>
<tr>
<td>0x52</td>
<td>dastore</td>
<td>无</td>
<td>将栈顶double型数值存入指定数组的指定索引位置</td>
</tr>
<tr>
<td>0x53</td>
<td>aastore</td>
<td>无</td>
<td>将栈顶引用型数值存入指定数组的指定索引位置</td>
</tr>
<tr>
<td>0x54</td>
<td>bastore</td>
<td>无</td>
<td>将栈顶boolean或byte型数值存入指定数组的指定索引位置</td>
</tr>
<tr>
<td>0x55</td>
<td>castore</td>
<td>无</td>
<td>将栈顶char型数值存入指定数组的指定索引位置</td>
</tr>
<tr>
<td>0x56</td>
<td>sastore</td>
<td>无</td>
<td>将栈顶short型数值存入指定数组的指定索引位置</td>
</tr>
<tr>
<td>0x57</td>
<td>pop</td>
<td>无</td>
<td>将栈顶数值弹出 (数值不能是long或double类型的)</td>
</tr>
<tr>
<td>0x58</td>
<td>pop2</td>
<td>无</td>
<td>将栈顶的一个（long或double类型的)或两个数值弹出（其它）</td>
</tr>
<tr>
<td>0x59</td>
<td>dup</td>
<td>无</td>
<td>复制栈顶数值并将复制值压入栈顶</td>
</tr>
<tr>
<td>0x5a</td>
<td>dup_x1</td>
<td>无</td>
<td>复制栈顶数值并将两个复制值压入栈顶</td>
</tr>
<tr>
<td>0x5b</td>
<td>dup_x2</td>
<td>无</td>
<td>复制栈顶数值并将三个（或两个）复制值压入栈顶</td>
</tr>
<tr>
<td>0x5c</td>
<td>dup2</td>
<td>无</td>
<td>复制栈顶一个（long或double类型的)或两个（其它）数值并将复制值压入栈顶</td>
</tr>
<tr>
<td>0x5d</td>
<td>dup2_x1</td>
<td>无</td>
<td>&lt;待补充&gt;</td>
</tr>
<tr>
<td>0x5e</td>
<td>dup2_x2</td>
<td>无</td>
<td>&lt;待补充&gt;</td>
</tr>
<tr>
<td>0x5f</td>
<td>swap</td>
<td>无</td>
<td>将栈最顶端的两个数值互换(数值不能是long或double类型的)</td>
</tr>
<tr>
<td>0x60</td>
<td>iadd</td>
<td>无</td>
<td>将栈顶两int型数值相加并将结果压入栈顶</td>
</tr>
<tr>
<td>0x61</td>
<td>ladd</td>
<td>无</td>
<td>将栈顶两long型数值相加并将结果压入栈顶</td>
</tr>
<tr>
<td>0x62</td>
<td>fadd</td>
<td>无</td>
<td>将栈顶两float型数值相加并将结果压入栈顶</td>
</tr>
<tr>
<td>0x63</td>
<td>dadd</td>
<td>无</td>
<td>将栈顶两double型数值相加并将结果压入栈顶</td>
</tr>
<tr>
<td>0x64</td>
<td>isub</td>
<td>无</td>
<td>将栈顶两int型数值相减并将结果压入栈顶</td>
</tr>
<tr>
<td>0x65</td>
<td>lsub</td>
<td>无</td>
<td>将栈顶两long型数值相减并将结果压入栈顶</td>
</tr>
<tr>
<td>0x66</td>
<td>fsub</td>
<td>无</td>
<td>将栈顶两float型数值相减并将结果压入栈顶</td>
</tr>
<tr>
<td>0x67</td>
<td>dsub</td>
<td>无</td>
<td>将栈顶两double型数值相减并将结果压入栈顶</td>
</tr>
<tr>
<td>0x68</td>
<td>imul</td>
<td>无</td>
<td>将栈顶两int型数值相乘并将结果压入栈顶</td>
</tr>
<tr>
<td>0x69</td>
<td>lmul</td>
<td>无</td>
<td>将栈顶两long型数值相乘并将结果压入栈顶</td>
</tr>
<tr>
<td>0x6a</td>
<td>fmul</td>
<td>无</td>
<td>将栈顶两float型数值相乘并将结果压入栈顶</td>
</tr>
<tr>
<td>0x6b</td>
<td>dmul</td>
<td>无</td>
<td>将栈顶两double型数值相乘并将结果压入栈顶</td>
</tr>
<tr>
<td>0x6c</td>
<td>idiv</td>
<td>无</td>
<td>将栈顶两int型数值相除并将结果压入栈顶</td>
</tr>
<tr>
<td>0x6d</td>
<td>ldiv</td>
<td>无</td>
<td>将栈顶两long型数值相除并将结果压入栈顶</td>
</tr>
<tr>
<td>0x6e</td>
<td>fdiv</td>
<td>无</td>
<td>将栈顶两float型数值相除并将结果压入栈顶</td>
</tr>
<tr>
<td>0x6f</td>
<td>ddiv</td>
<td>无</td>
<td>将栈顶两double型数值相除并将结果压入栈顶</td>
</tr>
<tr>
<td>0x70</td>
<td>irem</td>
<td>无</td>
<td>将栈顶两int型数值作取模运算并将结果压入栈顶</td>
</tr>
<tr>
<td>0x71</td>
<td>lrem</td>
<td>无</td>
<td>将栈顶两long型数值作取模运算并将结果压入栈顶</td>
</tr>
<tr>
<td>0x72</td>
<td>frem</td>
<td>无</td>
<td>将栈顶两float型数值作取模运算并将结果压入栈顶</td>
</tr>
<tr>
<td>0x73</td>
<td>drem</td>
<td>无</td>
<td>将栈顶两double型数值作取模运算并将结果压入栈顶</td>
</tr>
<tr>
<td>0x74</td>
<td>ineg</td>
<td>无</td>
<td>将栈顶int型数值取负并将结果压入栈顶</td>
</tr>
<tr>
<td>0x75</td>
<td>lneg</td>
<td>无</td>
<td>将栈顶long型数值取负并将结果压入栈顶</td>
</tr>
<tr>
<td>0x76</td>
<td>fneg</td>
<td>无</td>
<td>将栈顶float型数值取负并将结果压入栈顶</td>
</tr>
<tr>
<td>0x77</td>
<td>dneg</td>
<td>无</td>
<td>将栈顶double型数值取负并将结果压入栈顶</td>
</tr>
<tr>
<td>0x78</td>
<td>ishl</td>
<td>无</td>
<td>将int型数值左移位指定位数并将结果压入栈顶</td>
</tr>
<tr>
<td>0x79</td>
<td>lshl</td>
<td>无</td>
<td>将long型数值左移位指定位数并将结果压入栈顶</td>
</tr>
<tr>
<td>0x7a</td>
<td>ishr</td>
<td>无</td>
<td>将int型数值右（符号）移位指定位数并将结果压入栈顶</td>
</tr>
<tr>
<td>0x7b</td>
<td>lshr</td>
<td>无</td>
<td>将long型数值右（符号）移位指定位数并将结果压入栈顶</td>
</tr>
<tr>
<td>0x7c</td>
<td>iushr</td>
<td>无</td>
<td>将int型数值右（无符号）移位指定位数并将结果压入栈顶</td>
</tr>
<tr>
<td>0x7d</td>
<td>lushr</td>
<td>无</td>
<td>将long型数值右（无符号）移位指定位数并将结果压入栈顶</td>
</tr>
<tr>
<td>0x7e</td>
<td>iand</td>
<td>无</td>
<td>将栈顶两int型数值作“按位与”并将结果压入栈顶</td>
</tr>
<tr>
<td>0x7f</td>
<td>land</td>
<td>无</td>
<td>将栈顶两long型数值作“按位与”并将结果压入栈顶</td>
</tr>
<tr>
<td>0x80</td>
<td>ior</td>
<td>无</td>
<td>将栈顶两int型数值作“按位或”并将结果压入栈顶</td>
</tr>
<tr>
<td>0x81</td>
<td>lor</td>
<td>无</td>
<td>将栈顶两long型数值作“按位或”并将结果压入栈顶</td>
</tr>
<tr>
<td>0x82</td>
<td>ixor</td>
<td>无</td>
<td>将栈顶两int型数值作“按位异或”并将结果压入栈顶</td>
</tr>
<tr>
<td>0x83</td>
<td>lxor</td>
<td>无</td>
<td>将栈顶两long型数值作“按位异或”并将结果压入栈顶</td>
</tr>
<tr>
<td>0x84</td>
<td>iinc</td>
<td>无</td>
<td>将指定int型变量增加指定值（i++, i--, i+=2）</td>
</tr>
<tr>
<td>0x85</td>
<td>i2l</td>
<td>无</td>
<td>将栈顶int型数值强制转换成long型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x86</td>
<td>i2f</td>
<td>无</td>
<td>将栈顶int型数值强制转换成float型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x87</td>
<td>i2d</td>
<td>无</td>
<td>将栈顶int型数值强制转换成double型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x88</td>
<td>l2i</td>
<td>无</td>
<td>将栈顶long型数值强制转换成int型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x89</td>
<td>l2f</td>
<td>无</td>
<td>将栈顶long型数值强制转换成float型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x8a</td>
<td>l2d</td>
<td>无</td>
<td>将栈顶long型数值强制转换成double型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x8b</td>
<td>f2i</td>
<td>无</td>
<td>将栈顶float型数值强制转换成int型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x8c</td>
<td>f2l</td>
<td>无</td>
<td>将栈顶float型数值强制转换成long型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x8d</td>
<td>f2d</td>
<td>无</td>
<td>将栈顶float型数值强制转换成double型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x8e</td>
<td>d2i</td>
<td>无</td>
<td>将栈顶double型数值强制转换成int型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x8f</td>
<td>d2l</td>
<td>无</td>
<td>将栈顶double型数值强制转换成long型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x90</td>
<td>d2f</td>
<td>无</td>
<td>将栈顶double型数值强制转换成float型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x91</td>
<td>i2b</td>
<td>无</td>
<td>将栈顶int型数值强制转换成byte型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x92</td>
<td>i2c</td>
<td>无</td>
<td>将栈顶int型数值强制转换成char型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x93</td>
<td>i2s</td>
<td>无</td>
<td>将栈顶int型数值强制转换成short型数值并将结果压入栈顶</td>
</tr>
<tr>
<td>0x94</td>
<td>lcmp</td>
<td></td>
<td>比较栈顶两long型数值大小，并将结果（1，0，-1）压入栈顶</td>
</tr>
<tr>
<td>0x95</td>
<td>fcmpl</td>
<td></td>
<td>比较栈顶两float型数值大小，并将结果（1，0，-1）压入栈顶；当其中一个数值为NaN时，将-1压入栈顶</td>
</tr>
<tr>
<td>0x96</td>
<td>fcmpg</td>
<td></td>
<td>比较栈顶两float型数值大小，并将结果（1，0，-1）压入栈顶；当其中一个数值为NaN时，将1压入栈顶</td>
</tr>
<tr>
<td>0x97</td>
<td>dcmpl</td>
<td></td>
<td>比较栈顶两double型数值大小，并将结果（1，0，-1）压入栈顶；当其中一个数值为NaN时，将-1压入栈顶</td>
</tr>
<tr>
<td>0x98</td>
<td>dcmpg</td>
<td></td>
<td>比较栈顶两double型数值大小，并将结果（1，0，-1）压入栈顶；当其中一个数值为NaN时，将1压入栈顶</td>
</tr>
<tr>
<td>0x99</td>
<td>ifeq</td>
<td></td>
<td>当栈顶int型数值等于0时跳转</td>
</tr>
<tr>
<td>0x9a</td>
<td>ifne</td>
<td></td>
<td>当栈顶int型数值不等于0时跳转</td>
</tr>
<tr>
<td>0x9b</td>
<td>iflt</td>
<td></td>
<td>当栈顶int型数值小于0时跳转</td>
</tr>
<tr>
<td>0x9c</td>
<td>ifge</td>
<td></td>
<td>当栈顶int型数值大于等于0时跳转</td>
</tr>
<tr>
<td>0x9d</td>
<td>ifgt</td>
<td></td>
<td>当栈顶int型数值大于0时跳转</td>
</tr>
<tr>
<td>0x9e</td>
<td>ifle</td>
<td></td>
<td>当栈顶int型数值小于等于0时跳转</td>
</tr>
<tr>
<td>0x9f</td>
<td>if_icmpeq</td>
<td></td>
<td>比较栈顶两int型数值大小，当结果等于0时跳转</td>
</tr>
<tr>
<td>0xa0</td>
<td>if_icmpne</td>
<td></td>
<td>比较栈顶两int型数值大小，当结果不等于0时跳转</td>
</tr>
<tr>
<td>0xa1</td>
<td>if_icmplt</td>
<td></td>
<td>比较栈顶两int型数值大小，当结果小于0时跳转</td>
</tr>
<tr>
<td>0xa2</td>
<td>if_icmpge</td>
<td></td>
<td>比较栈顶两int型数值大小，当结果大于等于0时跳转</td>
</tr>
<tr>
<td>0xa3</td>
<td>if_icmpgt</td>
<td></td>
<td>比较栈顶两int型数值大小，当结果大于0时跳转</td>
</tr>
<tr>
<td>0xa4</td>
<td>if_icmple</td>
<td></td>
<td>比较栈顶两int型数值大小，当结果小于等于0时跳转</td>
</tr>
<tr>
<td>0xa5</td>
<td>if_acmpeq</td>
<td></td>
<td>比较栈顶两引用型数值，当结果相等时跳转</td>
</tr>
<tr>
<td>0xa6</td>
<td>if_acmpne</td>
<td></td>
<td>比较栈顶两引用型数值，当结果不相等时跳转</td>
</tr>
<tr>
<td>0xa7</td>
<td>goto</td>
<td></td>
<td>无条件跳转</td>
</tr>
<tr>
<td>0xa8</td>
<td>jsr</td>
<td></td>
<td>跳转至指定16位offset位置，并将jsr下一条指令地址压入栈顶</td>
</tr>
<tr>
<td>0xa9</td>
<td>ret</td>
<td></td>
<td>返回至本地变量指定的index的指令位置（一般与jsr, jsr_w联合使用）</td>
</tr>
<tr>
<td>0xaa</td>
<td>tableswitch</td>
<td></td>
<td>用于switch条件跳转，case值连续（可变长度指令）</td>
</tr>
<tr>
<td>0xab</td>
<td>lookupswitch</td>
<td></td>
<td>用于switch条件跳转，case值不连续（可变长度指令）</td>
</tr>
<tr>
<td>0xac</td>
<td>ireturn</td>
<td></td>
<td>从当前方法返回int</td>
</tr>
<tr>
<td>0xad</td>
<td>lreturn</td>
<td></td>
<td>从当前方法返回long</td>
</tr>
<tr>
<td>0xae</td>
<td>freturn</td>
<td></td>
<td>从当前方法返回float</td>
</tr>
<tr>
<td>0xaf</td>
<td>dreturn</td>
<td></td>
<td>从当前方法返回double</td>
</tr>
<tr>
<td>0xb0</td>
<td>areturn</td>
<td></td>
<td>从当前方法返回对象引用</td>
</tr>
<tr>
<td>0xb1</td>
<td>return</td>
<td></td>
<td>从当前方法返回void</td>
</tr>
<tr>
<td>0xb2</td>
<td>getstatic</td>
<td></td>
<td>获取指定类的静态域，并将其值压入栈顶</td>
</tr>
<tr>
<td>0xb3</td>
<td>putstatic</td>
<td></td>
<td>为指定的类的静态域赋值</td>
</tr>
<tr>
<td>0xb4</td>
<td>getfield</td>
<td></td>
<td>获取指定类的实例变量，并将其值压入栈顶</td>
</tr>
<tr>
<td>0xb5</td>
<td>putfield</td>
<td></td>
<td>为指定的类的实例变量赋值</td>
</tr>
<tr>
<td>0xb6</td>
<td>invokevirtual</td>
<td></td>
<td>调用实例方法</td>
</tr>
<tr>
<td>0xb7</td>
<td>invokespecial</td>
<td></td>
<td>调用超类构造方法，实例初始化方法，私有方法</td>
</tr>
<tr>
<td>0xb8</td>
<td>invokestatic</td>
<td></td>
<td>调用静态方法</td>
</tr>
<tr>
<td>0xb9</td>
<td>invokeinterface</td>
<td></td>
<td>调用接口方法</td>
</tr>
<tr>
<td>0xbb</td>
<td>new</td>
<td></td>
<td>创建一个对象，并将其引用值压入栈顶</td>
</tr>
<tr>
<td>0xbc</td>
<td>newarray</td>
<td></td>
<td>创建一个指定原始类型（如int, float, char…）的数组，并将其引用值压入栈顶</td>
</tr>
<tr>
<td>0xbd</td>
<td>anewarray</td>
<td></td>
<td>创建一个引用型（如类，接口，数组）的数组，并将其引用值压入栈顶</td>
</tr>
<tr>
<td>0xbe</td>
<td>arraylength</td>
<td></td>
<td>获得数组的长度值并压入栈顶</td>
</tr>
<tr>
<td>0xbf</td>
<td>athrow</td>
<td>无</td>
<td>将栈顶的异常抛出</td>
</tr>
<tr>
<td>0xc0</td>
<td>checkcast</td>
<td></td>
<td>检验类型转换，检验未通过将抛出ClassCastException</td>
</tr>
<tr>
<td>0xc1</td>
<td>instanceof</td>
<td></td>
<td>检验对象是否是指定的类的实例，如果是将1压入栈顶，否则将0压入栈顶</td>
</tr>
<tr>
<td>0xc2</td>
<td>monitorenter</td>
<td></td>
<td>获得对象的锁，用于同步方法或同步块</td>
</tr>
<tr>
<td>0xc3</td>
<td>monitorexit</td>
<td></td>
<td>释放对象的锁，用于同步方法或同步块</td>
</tr>
<tr>
<td>0xc4</td>
<td>wide</td>
<td></td>
<td>&lt;待补充&gt;</td>
</tr>
<tr>
<td>0xc5</td>
<td>multianewarray</td>
<td></td>
<td>创建指定类型和指定维度的多维数组（执行该指令时，操作栈中必须包含各维度的长度值），并将其引用值压入栈顶</td>
</tr>
<tr>
<td>0xc6</td>
<td>ifnull</td>
<td></td>
<td>为null时跳转</td>
</tr>
<tr>
<td>0xc7</td>
<td>ifnonnull</td>
<td></td>
<td>不为null时跳转</td>
</tr>
<tr>
<td>0xc8</td>
<td>goto_w</td>
<td></td>
<td>无条件跳转（宽索引）</td>
</tr>
</tbody>
</table>

            </div>
            
              <div class="tag-container">
                
                  <a href="https://skylaugh.gitee.io/blog/tag/5nWxaev-g/" class="tag">
                    JVM
                  </a>
                
              </div>
            
            
              <div class="next-post">
                <div class="next">下一篇</div>
                <a href="https://skylaugh.gitee.io/blog/post/spring-xue-xi-bi-ji-yi/">
                  <h3 class="post-title">
                    Spring学习笔记（一）
                  </h3>
                </a>
              </div>
            

            

          </div>

        </div>
      </div>
    </div>

    <script src="https://unpkg.com/aos@next/dist/aos.js"></script>

<script type="application/javascript">

AOS.init();

hljs.initHighlightingOnLoad()

var app = new Vue({
  el: '#app',
  data: {
    menuVisible: false,
  },
})

</script>




  </body>
</html>
